#! /usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2020-03-30 19:36
# @Author : youngchaolin

print()

'''
r+
'''

# 先读后写
f1=open('文件的读.txt',encoding='utf-8',mode='r+')
content=f1.read()
print(content)
print('目标光标位置:',f1.tell())
f1.write('\n先读后写的内容')
f1.close()

# 先写后读
# f1=open('文件的读.txt',encoding='utf-8',mode='r+')
# f1.write('先读后写的内容')
# content=f1.read()
# print(content)
# f1.close()

# 不管是哪种，考虑一个光标的概念，就好理解